getSharesAndCostBasisForAsOf

Returns a SharesOwnedAsOf data class containing the shares owned, and cost basis upto/asof the date requested.

Parameters

excludeSyntheticTxn

when false (default) then any (optional) unRealizedSaleTxn synthetic unrealized sell-all sale transaction will be included in the result. Notes: - if the calculation's as-of date is null, then null will be returned. - for LOT controlled securities, costBasisAsOf will be zero and isCostBasisValid false when the security account's cost basis is invalid. The excludeSyntheticTxn parameter / constructor was added @since MD2027